import { http } from "@/uni-sub-base/service/request.js"
let serviceName = "Product/"
import { getBaseUrl } from "@/utils/appUrls.js"
//品牌列表
export function productBrandList(path) {
    return http.post({
        url: getBaseUrl() + serviceName + "productBrandList" + path,
    })
}
//tag列表
export function getTagList(path) {
    return http.post({
        url: getBaseUrl() + serviceName + "getTagList" + path,
    })
}
//商品分类树列表
export function getProductTypeTree(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetProductTypeTree",
        data,
    })
}
//批发商品列表-带规格
export function getWholeSaleListForSku(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "getWholeSaleListForSku",
        data,
    })
}
//获取商品详情
export function getInintProductDetailInfo(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "getInintProductDetailInfo",
        data,
    })
}
//获取商品评论
export function getCommentListByProduct(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "getCommentListByProduct",
        data,
    })
}
//获取整体显示设置
export function GetProductDisplay(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetProductDisplay",
        data,
    })
}
//根据表单id获取商品表单属性列表
export function GetDetailListById(path) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetDetailListById" + path,
    })
}
//缺货登记
export function SaveLackStock(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "SaveLackStock",
        data,
    })
}
//按ID获取商品分类列表
export function GetProductCategoryList(path) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetProductCategoryList" + path,
    })
}
//商品列表-通过条形码找商品 SearchType:1条形码查询，2选购商品
export function GetScanBuyProductList(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetScanBuyProductList",
        data,
    })
}
//选购商品 购物袋
export function GetScanAddBuyProducts(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetScanAddBuyProducts",
        data,
    })
}
//通过条形码添加购物车
export function AddScanBuyProductToCar(path) {
    return http.post({
        url: getBaseUrl() + serviceName + "AddScanBuyProductToCar" + path,
    })
}

/**
 * 专款专项接口
 */

// 获取专款额度
export function GetAccountBalance() {
    return http.post({
        url: getBaseUrl() + "Member/GetAccountBalance",
    })
}

// 获取用户专款产品线
export function GetUserProductLine() {
    return http.post({
        url: getBaseUrl() + "Member/GetUserProductLine",
    })
}

// 产品线获取分类
export function GetProductCategoryListByLine(data) {
    return http.get({
        url: getBaseUrl() + "Product/GetProductCategoryListByLine",
        data
    })
}

// 产品线获取商品列表
export function GetWholeSaleListForSku(data) {
    return http.post({
        url: getBaseUrl() + "Product/GetWholeSaleListForSku",
        data
    })
}